package day_2022_7_to_8.day48;

/**
 * @author haomin
 * @date 2022/08/31 16:23
 **/
public class Day46_5_Offer27_MirrorTree {
    class Solution {
        public TreeNode mirrorTree(TreeNode root) {
            if(root == null) return root;

            TreeNode temp = root.left;
            root.left = root.right;
            root.right = temp;

            mirrorTree(root.left);
            mirrorTree(root.right);
            return root;
        }
    }
}